home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / rep_man.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  1KB  |  44 lines

  1. #ifndef __REPORT_MANAGER_H_
  2. #define __REPORT_MANAGER_H_
  3.  
  4. #include "pxtable.h"
  5. #include "prn_page.h"
  6. #include "text_buf.h"
  7. #include <stdio.h>
  8.  
  9. enum QUALITY { DRAFT, HI };
  10. enum LABELS_FORMAT { LABELS_AS_IS, SKIP_WHITE };
  11.  
  12. class ReportManager
  13.     {
  14.     protected:
  15.     PAGE_LAYOUT* page;
  16.     KH_PXTable*  table;
  17.     QUALITY quality;
  18.     TextPage* textPage;
  19.     int page_number;
  20.     loc curr_pos;          // Page current position
  21.     int labels_format;     // Wrap to fit more than 1 rec. side by side. Not used
  22.     int num_of_col;
  23.         long record_number;
  24.     public:
  25.     ReportManager(PAGE_LAYOUT* p, KH_PXTable* t, QUALITY q = DRAFT,
  26.         LABELS_FORMAT lf = LABELS_AS_IS, int noc = 1)
  27.         { page = p; table = t; quality = q; page_number = 1;
  28.           textPage = q == DRAFT ? new TextPage() : NULL;
  29.           curr_pos = loc(0, 0); labels_format = lf; num_of_col = noc;
  30.               record_number = 1;
  31.         }
  32.     ~ReportManager() { delete textPage; }
  33.  
  34.     int buildPage(int table_beginning);
  35.     int draw_addinfo(ADDINFO_LAYOUT* info);
  36.     void print_page();
  37.     void print();
  38.     int print_add(ADD_LIST* add, loc pos);
  39.     int print_record(int stop_printing);
  40.     virtual int exit_func() { return 1; }
  41.  
  42.     };
  43.  
  44. #endif __REPORT_MANAGER_H_